#@adminLayout() #define main()
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-dict-edit" >
			<input name="dict_code"  type="hidden"  />
			<div class="form-group">
				<label class="col-sm-3 control-label ">字典标签：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="dict_label" id="dictLabel" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label ">字典键值：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="dict_value" id="dictValue" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">字典类型：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" readonly="true"  name="dict_type" id="dict_type">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">样式属性：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" id="cssClass" name="css_class" >
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">字典排序：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="dict_sort" required>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">回显样式：</label>
				<div class="col-sm-8">
					<select name="listClass" class="form-control m-b">
					    <option value=""        >请选择</option>
	                    <option value="default" >默认</option>
	                    <option value="primary" >主要</option>
	                    <option value="success" >成功</option>
	                    <option value="info"    >信息</option>
	                    <option value="warning" >警告</option>
	                    <option value="danger"  >危险</option>
	                </select>
	                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> table表格字典列显示样式属性</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">系统默认：</label>
					<div >
					#for(data: getDict('sys_yes_no',c_pro))
						<input type="radio"  name="is_default" value="#(data.value)">
						<label>#(data.label)</label>
					#end
					</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">状态：</label>
				
					<div >
					#for(data: getDict('sys_normal_disable',c_pro))
						<input type="radio"  name="status" value="#(data.value)">
						<label>#(data.label)</label>
					#end
					</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea id="remark" name="remark" class="form-control"></textarea>
				</div>
			</div>
		</form>
	</div>
	<script type="text/javascript">
		var prefix = "#(ctx)/SysDictData";
		var id='#(id)';
		var dict_type='#(dict_type)';
		var c_pro='#(c_pro)';
    	$(function(){

            $('#form-dict-edit').loadForm(prefix+'/getData?id='+id);
           
            if(dict_type!='')
            {
            	$('#dict_type').val(dict_type);
            }
    	});
		$("#form-dict-edit").validate({
			rules:{
				dictSort:{
					digits:true
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	        	$.operate.save(prefix + "/save", $('#form-dict-edit').serialize());
	        }
	    }
	</script>
</body>
#end
